The present embodiments relate to electronic audio signal processing circuits and are more particularly directed to a variable digital high and low pass filter, as may be implemented together in a variable digital crossover.
Electronic circuits have become prevalent in numerous applications, including uses for devices in personal, business, and other environments. Demands of the marketplace affect many aspects of circuit design, including factors such as device complexity and cost. Various electronic circuits are directed to audio signal processing and, quite often, these circuits also are subject to these design factors. Audio signal processing has evolved over a considerable period of time, and as such various techniques have been implemented in efforts to reduce complexity and cost, yet at the same time while maintaining or even improving sound performance. Further, over the evolution of sound processing, digital circuits have grown in popularity to replace large portions of sound processing circuits that were formerly implemented with analog components. Also driving the move to digital circuit implementations is the fact that many sources of audio signals are now presented in digital format, including by ways of example but without limitation, digital tapes, compact disks, digital video disks (“DVDs”), as well as the output from digital interfaces on many contemporary audio output devices such as tuners, computers, DVD/CD/MP3 players, televisions, satellite receivers, and so forth.
In the field of audio signal processing, one known devices is referred to as an audio crossover. A crossover typically includes both a low pass and a high pass filter, and it is used to separate, from a single audio signal, the lower frequency components from the higher frequency components. A common and preferred use for such a device is to drive one or more speakers, where certain speakers or speaker components are preferred to be driven with the signal lower frequency components while other speakers or speaker components are preferred to be driven with the signal higher frequency components. For example, often a single speaker may include a separate woofer that has a favorable response to low frequency signals, while that same speaker also includes a tweeter that has a favorable response to high frequency signals. With such a speaker, a crossover can be connected to an audio signal so that the lower frequency components of the signal are directed to the speaker woofer while the higher frequency components of the signal are directed to the speaker tweeter. Such an approach also may be used in more complex systems, but in any event often produces a more quality and pleasing sound to a listener.
As mentioned earlier, a crossover typically includes both a low pass and a high pass filter, and by way of further introduction such filters are now explored in greater detail in connection with the prior art illustrations of FIG. 1. Toward the right of FIG. 1, it illustrates a frequency response FR1 in the recognized shape of a high pass filter, and at the same time FIG. 1 also illustrates a frequency response FR2 in the recognized shape of a low pass filter toward the left of the figure. Each of these frequency responses is discussed separately, below. Further, from this discussion, one skilled in the art will appreciate that the low pass filter portion of a crossover may be used to pass low frequency components of an audio signal to a speaker woofer, while the high pass filter portion of a crossover may be used to pass high frequency components of an audio signal to a speaker tweeter.
With respect to frequency response FR1, it has a corner frequency CF1, which typically is defined in the art to occur at 3 dB below the horizontal asymptote of the filter; in the example illustrated, the horizontal asymptote is at 0 dB and, thus, corner frequency CF1 occurs at approximately 50 Hz. As an aside, for some filters the corner is defined at different levels, such as at 6 dB below the filter's horizontal asymptote. In any event, at frequencies greater than corner frequency CF1, the response approaches the asymptote of 0 dB, meaning a gain of 1. In other words, for signals input to the high pass filter and higher than its corner frequency CF1, generally those high-frequency signals are not affected by the filter as indicated by the 0 dB asymptote, that is, they “pass” unaffected from the filter input to the filter output; hence, the filter is referred to as a high pass filter. In contrast, at frequencies less than corner frequency CF1, the response tends toward negative infinity. As a result, the filter suppresses these lower-frequency signals from the filter output. Also, in a practical implementation, a high pass filter response may tail off to some finite value far below the 0 dB asymptote, but that value is typically selected to be considerably below what should be audible when the signal is ultimately output via a speaker or the like, or is at least low enough to achieve the desired purpose. For example, such a tail may occur at a level on the order of −100 dB. In any event, when connecting an audio signal, by way of example, through a high pass filter of a crossover to a speaker tweeter, only the higher frequency signals pass unaffected to the tweeter, while the remaining signals are eliminated and, thus, are not presented to the tweeter.
With respect to frequency response FR2, it has a corner frequency CF2, which also is typically defined in the art to occur at 3 dB below the horizontal asymptote of the filter; in the example illustrated, the horizontal asymptote is at 0 dB and, thus, corner frequency CF2 occurs at approximately 200 Hz. Once more, the corner frequency may be defined at a different level, such as at 6 dB below the filter's horizontal asymptote. At frequencies less than corner frequency CF2, the response approaches the asymptote of 0 dB, meaning a gain of 1. In other words, for signals input to the low pass filter and lower than its corner frequency CF2, generally those low-frequency signals are not affected by the filter as indicated by the 0 dB asymptote, that is, they “pass” unaffected from the filter input to the filter output; hence, the filter is referred to as a low pass filter. In contrast, at frequencies greater than corner frequency CF2, the response tends toward negative infinity. As a result, the filter suppresses these higher-frequency signals from the filter output. Also, in a practical implementation, a low pass filter also may tail off to some finite value far below the 0 dB asymptote, such as on the order of −100 dB below the asymptote, where that value is typically selected to be considerably below what should be audible when the signal is ultimately output via a speaker or the like. In any event, therefore, when connecting an audio signal, by way of example, through a low pass filter of a crossover to a speaker woofer, only the lower frequency signals pass unaffected to the woofer, while the remaining signals are eliminated and, thus, are not presented to the woofer.
Given the above, the present inventor endeavors in the preferred embodiments described later to implement low and high pass filters in a digital implementation, which if combined provide a digital crossover. Further, the preferred embodiment low and high pass filters have adjustable corner frequencies, thereby permitting a user or other input to effectively tune the extent to which the filter permits signals (either high or low frequency, based on the filter type) to pass through the filter. Such an approach is provided to address the complexities of the prior art, including reducing the complexity and cost of implementing such devices, while still providing an acceptable level of performance.
By way of further background, the present inventor along with other inventors previously described a digital implementation for a different type of filter than those of the present preferred embodiments, namely, the previous approach is directed to so-called shelving (or “shelf”) filters; this description is provided in U.S. patent application Ser. No. 09/408,095, entitled “Digital Tone Control With Linear Step Coefficients,” filed Sep. 27, 1999, assigned to Texas Instruments Incorporated, and hereby incorporated herein by reference. Indeed, Texas Instruments Incorporated also has commercially sold a device that includes a variable gain shelf filter identified as a TLC320AD81, TAS3001, TAS3002, TAS3004, TAS3103. The approach described in the referenced patent application, and also included in the commercial TLC320AD81, TAS3001, TAS3002, TAS3004, TAS3103 devices, provides numerous benefits for variable-gain shelf filters, and further in this regard the incorporated application and the TLC320AD81, TAS3001, TAS3002, TAS3004, TAS3103 devices achieve their results, in part, by applying piecewise linearization to the shelf filter coefficients while still permitting different filters, each with a different gain, to be applied to an audio signal. At this point, therefore, and by way of contrast, additional discussion is noteworthy with respect to the differences between the previously-described shelf filters, as may be contrasted to the high and low pass filters of the present preferred embodiments, where such filters were introduced above in connection with FIG. 1 and are further discussed below.
Shelf filters are so named because the response curve of such a filter typically includes two horizontal asymptotes, known as shelves. By way of example, FIG. 2 illustrates a frequency response FR3 in the recognized shape for a shelf filter. Frequency response FR3 has a corner frequency CF3, which for consistency with the preceding examples is defined to occur at 3 dB below the upper horizontal asymptote of the filter; further, for a shelf filter, the upper asymptote also may referred to as a first shelf SH1, where in the example illustrated shelf SH1 occurs at 0 dB. Additionally, the shelf filter includes a lower horizontal asymptote that provides a second shelf SH2, where in the example illustrated shelf SH2 occurs at −11 dB. Note that typically in the prior art the dB difference between the upper and lower shelves of a shelf filter is on the order of 18 dB or less. At frequencies along the upper shelf SH1, an audio signal input to the shelf filter is undisturbed, that is, a gain of 0 dB, translating to a value of 1, is applied to the input signal, thereby passing the input signal unaffected to the filter output. Conversely, at frequencies along the lower shelf SH2, an audio signal input to the shelf filter is attenuated; in the example of FIG. 2, the attenuation is at a level of −11 dB.
Given the preceding and the skill in the art, various differences can be recognized as between prior art high/low pass filters (e.g., FIG. 1) and prior art shelf filters (e.g., FIG. 2). First, high/low pass filters are intended to completely eliminate a portion of the frequency band of their input signals following their corner frequency and toward their drop off to negative infinity, while shelf filters pass are typically not intended to eliminate any band of the input signal, rather, shelf filters often pass the entire input signal, albeit at two different levels, with the first level provided by one shelf (e.g., shelf SH1 in FIG. 2) while only reducing the signal to a second level at the frequencies of the other shelf (e.g., shelf SH2 in FIG. 2). In other words, for shelf filters, there is no passband or stopband since all frequencies are passed. The active region is where the boost or cut of the filter is applied, while the inactive region is where the signal is unaffected. Further, mathematics demonstrate that the two types of filters are quite distinct. By way of introduction, the generalized transfer function of both types of filters, as second order filters, may be represented by the following Equation 1, where the transfer function represents, in the time domain, the accumulation of samples at different delays z−1 and z−2;
                              H          ⁡                      (            z            )                          =                                            b              0                        +                                          b                1                            ⁢                              z                                  -                  1                                                      +                                          b                2                            ⁢                              z                                  -                  2                                                                          1            +                                          a                1                            ⁢                              z                                  -                  1                                                      +                                          a                2                            ⁢                              z                                  -                  2                                                                                        Equation        ⁢                                  ⁢        1            In Equation 1, therefore, five coefficients b0, b1, b2, a1, and a2 are provided, and which once ascertained distinguish various filters from one another; moreover, note that the value “1” in the denominator is also sometimes referred to a sixth coefficient a0, but for the sake of this document, that value can be maintained as equal to one. In any event, for sake of truly understanding a specific type of filter as well as its behavior, Equation 1, as a transfer function, merely defines in a broad sense the relationship of the filter's output with the filter's input, that is, the output equals the input times H(z). As such, Equation 1 is a very simplified representation of the effect provided by the five different filter coefficients, a1, a2, b0, b1, and b2. To truly appreciate the difference between shelf filters and low/high pass filters, however, consider the following more precise mathematics as directed to the coefficients a1, a2, b0, b1, and b2, with reference to those coefficients first for a shelf filter and then for a high or low pass filter.
By way of example to a shelf filter, consider the known bass-oriented shelf filter; its five coefficients according to the preceding are as shown in the following Equations 2 through 6:
                              b          0                =                  -                                                    -                1                            +                              2                ⁢                a                            -                              2                ⁢                σ                ⁢                                                                  ⁢                                  g                  n                                            -                              2                ⁢                                  g                  n                  2                                ⁢                a                            +                              2                ⁢                σ                ⁢                                                                  ⁢                                  g                  n                                ⁢                                  a                  2                                            -                              a                2                            -                              g                n                2                            -                                                g                  n                  2                                ⁢                                  a                  2                                                                    1              -                              2                ⁢                a                            +                              2                ⁢                σ                ⁢                                                                  ⁢                                  g                  d                                            -                              2                ⁢                σ                ⁢                                                                  ⁢                                  g                  d                                ⁢                                  a                  2                                            +                              2                ⁢                                                                  ⁢                                  g                  d                  2                                ⁢                a                            +                              a                2                            +                              g                d                2                            +                                                g                  d                  2                                ⁢                                  a                  2                                                                                        Equation        ⁢                                  ⁢        2                                          b          1                =                  -                                    2              -                              4                ⁢                a                            -                              4                ⁢                                  g                  n                  2                                ⁢                a                            +                              2                ⁢                                  a                  2                                            -                              2                ⁢                                  g                  n                  2                                            -                              2                ⁢                                  g                  n                  2                                ⁢                                  a                  2                                                                    1              -                              2                ⁢                a                            +                              2                ⁢                σ                ⁢                                                                  ⁢                                  g                  d                                            -                              2                ⁢                σ                ⁢                                                                  ⁢                                  g                  d                                ⁢                                  a                  2                                            +                              2                ⁢                                                                  ⁢                                  g                  d                  2                                ⁢                a                            +                              a                2                            +                              g                d                2                            +                                                g                  d                  2                                ⁢                                  a                  2                                                                                        Equation        ⁢                                  ⁢        3                                          b          2                =                              1            -                          2              ⁢              a                        -                          2              ⁢              σ              ⁢                                                          ⁢                              g                n                                      +                          2              ⁢                              g                n                2                            ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                n                            ⁢                              a                2                                      +                          a              2                        +                          g              n              2                        +                                          g                n                2                            ⁢                              a                2                                                          1            -                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      +                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        4                                          a          1                =                                            -              2                        +                          4              ⁢              a                        +                          4              ⁢                              g                d                2                            ⁢              a                        -                          2              ⁢                              a                2                                      +                          2              ⁢                              g                d                2                                      +                          2              ⁢                              g                d                2                            ⁢                              a                2                                                          1            -                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      +                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        5                                          a          2                =                              1            -                          2              ⁢              a                        -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      +                          2              ⁢                              g                d                2                            ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                          1            -                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      +                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        6            Still further, for the known treble-oriented shelf filter; its five coefficients according to the preceding are as shown in the following Equations 7 through 11:
                              b          0                =                              1            +                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                n                                      -                          2              ⁢                              g                n                2                            ⁢              a                        -                          2              ⁢              σ              ⁢                                                          ⁢                              g                n                            ⁢                              a                2                                      +                          a              2                        +                          g              n              2                        +                                          g                n                2                            ⁢                              a                2                                                          1            +                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      -                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        7                                          b          1                =                              2            +                          4              ⁢              a                        +                          4              ⁢                              g                n                2                            ⁢              a                        +                          2              ⁢                              a                2                                      -                          2              ⁢                              g                n                2                                      -                          2              ⁢                              g                n                2                            ⁢                              a                2                                                          1            +                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      -                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        8                                          b          2                =                              1            +                          2              ⁢              a                        -                          2              ⁢              σ              ⁢                                                          ⁢                              g                n                                      -                          2              ⁢                              g                n                2                            ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                n                            ⁢                              a                2                                      +                          a              2                        +                          g              n              2                        +                                          g                n                2                            ⁢                              a                2                                                          1            +                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      -                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        9                                          a          1                =                              2            +                          4              ⁢              a                        +                          4              ⁢                              g                d                2                            ⁢              a                        +                          2              ⁢                              a                2                                      -                          2              ⁢                              g                d                2                                      -                          2              ⁢                              g                d                2                            ⁢                              a                2                                                          1            +                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      -                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        10                                          a          2                =                              1            +                          2              ⁢              a                        -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢                              g                d                2                            ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                          1            +                          2              ⁢              a                        +                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                                      -                          2              ⁢              σ              ⁢                                                          ⁢                              g                d                            ⁢                              a                2                                      -                          2              ⁢                                                          ⁢                              g                d                2                            ⁢              a                        +                          a              2                        +                          g              d              2                        +                                          g                d                2                            ⁢                              a                2                                                                        Equation        ⁢                                  ⁢        11            Further, various of the variables in the preceding Equations 2 through 11 are further defined based on the gain of the filter, according to following Equations 12 through 14:if gain≧0.5 and gain≦2, F=√{square root over (g)}  Equation 12
                                          if            ⁢                                                  ⁢            gain                    ≥                      1.0            ⁢                                                  ⁢            and            ⁢                                                  ⁢            gain                    ≤          2                ,                  F          =                      g                          2                                                          Equation        ⁢                                  ⁢        13            if gain<0.5 or gain>2, F=g√{square root over (2)}  Equation 14
With the value of F from the appropriate one of Equations 12 through 14, then the remaining variables for the above, including those directed to gain, are as in the following Equations 15 through 20, based in response to the desired corner frequency, fc, and the sampling frequency to be used in the system, Fs, where the latter is included because, as known in the art, digital filter coefficients are explicit functions of the system sampling frequency, that is, the actual frequency response—where the corner frequency occurs—will change when the sampling frequency changes.
                              g          d                =                                            F              2                        -            1                                                              g                2                            -                              F                2                                      4                                              Equation        ⁢                                  ⁢        15            gn=gd√{square root over (g)}  Equation 16
                    a        =                  tan          ⁡                      (                          π              ⁡                              (                                                                            f                      c                                                              F                      s                                                        -                                      1                    4                                                  )                                      )                                              Equation        ⁢                                  ⁢        17                                σ        =                              2                    2                                    Equation        ⁢                                  ⁢        18            
In contrast, however, consider now the coefficient definitions for either a high or low pass Linkwitz-Riley filters. For a low pass filter, and where ωc is 2π times the corner frequency, fc, the coefficients are as shown in the following Equations 19 through 23:
                              b          0                =                              ω            c            2                                              ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        19                                          b          1                =                              2            ⁢                          ω              c              2                                                          ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        20                                          b          2                =                              ω            c            2                                              ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        21                                          a          1                =                                            2              ⁢                              ω                c                2                                      -                          2              ⁢                              k                2                                                                        ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        22                                          a          2                =                                            ω              c              2                        +                          k              2                        -                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        23            Further, for a high pass Linkwitz-Riley filters, the coefficients a1 and a2 are the same as shown in Equations 22 and 23 for a low pass filter, while the remaining coefficients b0, b1, and b2 are as shown in the following Equations 24 through 26:
                              b          0                =                              k            2                                              ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        24                                          b          1                =                                            -              2                        ⁢                          k              2                                                          ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        25                                          b          2                =                              k            2                                              ω              c              2                        +                          k              2                        +                          2              ⁢              k              ⁢                                                          ⁢                              ω                c                                                                        Equation        ⁢                                  ⁢        26            
With the qualitative differences between shelf filters and high/low pass filters having been described above in connection with the contrast of FIGS. 1 and 2, one skilled in the art should also appreciate by contrasting Equations 2 through 18 with Equations 19 through 26 to further understand such differences. Having previously considered improving variable gain for shelf filters in the above-referenced U.S. patent application Ser. No. 09/408,095, various aspects of the preferred embodiments described below are not directed to filter gain or shelf filters, but instead are directed to adjusting the filter corner frequencies, and preferably adjusting those corner frequencies in high and low pass filters.